<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>预览证书副本</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style type="text/css">
			.inputNoborder {
			    FONT-SIZE: 16px;
			    FONT-FAMILY: 宋体;
			    BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.inputNoborder2 {
			    FONT-SIZE: 16px;
			    width:50px;
			    FONT-FAMILY: 宋体;
			     BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.inputNoborder3 {
			    FONT-SIZE: 16px;
			    width:35px;
			    FONT-FAMILY: 宋体;
			     BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.inputNoborder4 {
			    FONT-FAMILY: 宋体;
			      FONT-SIZE: 16px;
			     BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.tableCss{
				background-color:#000000;
				width: 100%;
			}
			.tdCss{
				background-color:#ffffff;
				height: 45px;
			}
			.justifyCss{
				width:90%;
				text-align:justify;
				text-justify:distribute-all-lines;
				text-align-last:justify;
			}
			.wd{
				width:98%;
			}
		
			
		</style>
		<script src="${ctx}/resources/components/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<script src="${ctx}/resources/js/ext/adapter/ext/ext-base.js" type="text/javascript"></script>
        <script src="${ctx}/resources/js/ext/ext-all.js" type="text/javascript"></script>
        <script src="${ctx}/resources/js/jquery/jquery.js" type="text/javascript"></script>
        
		<script type="text/javascript">
			function printQyzzfb(){
				var url="${ctx}/smart-form-shljqs!printFb.action?id="+document.getElementById("id").value;
               
                 window.open(url);
               // YwUtil.openWin({url: url, w: 1000, h: 800});
                
           }
		Ext.onReady(function(){
		  	var hjmc=document.getElementById("hjmc").value;
            if(hjmc.indexOf("czdjgz")>=0){//打印设置为不可编辑
              document.getElementById("printzs").style.display='block';
              document.getElementById("savezs").style.display='none';
	          for (var i = 0; i < document.forms[0].elements.length; i++) {
			        var element = document.forms[0].elements[i];
			       	 element.readOnly= true; 
			   }
            }else{
              document.getElementById("printzs").style.display='none';
              document.getElementById("savezs").style.display='block';
            } 
		 });
		 $(document).ready(function(){
		 	$("input:[name='qylx']:radio").each(function(){  
		     if (this.value ==$("#qylxId").val()){  
				  this.checked=true; 
				}  
			}); 
		 });
		 
		 
		 
		 function  savefb2(){
		 		var params = $("#shljqsForm").serialize();
					var url="${ctx}/smart-form-shljqs!saveFb2.action";
					$.ajax({
						url : url,
						type : "post",
						dataType : "html",
						data : params,
						success : function(msg) {
							if(msg=="success"){
								alert('保存成功!');
									
							}else{
								alert('保存失败！');
							}
							
						},
						error:function() {
							alert("添加失败！请刷新重试！");
						}
					});
		  }
		</script>
	</head>
	<body>
		<form action="" method="POST" name="shljqsForm" id="shljqsForm">
		<input type="hidden" name="id" value="${id}"/>
		<input type="hidden" name="hjmc" id="hjmc" value="${hjmc}">
		<input type="hidden" name="qylxId" id="qylxId" value="${qylx}">
		<input type="hidden" name="xmid4" id="xmid4" value="${xmid4}">
		<input type="hidden" name="xmid5" id="xmid5" value="${xmid5}">
		<input type="hidden" name="xmid6" id="xmid6" value="${xmid6}">
		<table width="1100" align="center">
			<tr>
				<td width="50%">
					<table width="100%" border=0 class="tableCss" cellspacing="1" cellpadding="0">
						<tr>
							<td style="text-align:center;" class="tdCss">
							变更登记
							</td>
						</tr>
						<tr>
							<td class="tdCss" valign="top">
								<div style="margin-left:10px;margin-top:10px;">
								变更记录：
								</div>
								<div style="margin-left:10px;height:90px;">
									${xmnr4}
								</div>
								
								<div style="text-align:right;">
								有效期限：从
          						<input name="startday4"  style="width:100px" value="${startday4}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								到
          						<input name="endday4"  style="width:100px" value="${endday4}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
								
								<div style="text-align:right;">
								审批部门（盖章）
								</div>
								<div style="text-align:right;">
          						<input name="gzsj4"  style="width:100px" value="${gzsj4}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
								<div style="margin-left:10px;margin-top:10px;">
								变更记录：
								</div>
								<div style="margin-left:10px;height:90px;">
									${xmnr5}
								</div>
								
								<div style="text-align:right;">
								有效期限：从
          						<input name="startday5"  style="width:100px" value="${startday5}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								到
          						<input name="endday5"  style="width:100px" value="${endday5}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
								
								<div style="text-align:right;">
								审批部门（盖章）
								</div>
								<div style="text-align:right;">
          						<input name="gzsj5"  style="width:100px" value="${gzsj5}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
								<div style="margin-left:10px;margin-top:10px;">
								变更记录：
								</div>
								<div style="margin-left:10px;height:90px;">
									${xmnr6}
								</div>
								
								<div style="text-align:right;">
								有效期限：从
          						<input name="startday6"  style="width:100px" value="${startday6}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								到
          						<input name="endday6"  style="width:100px" value="${endday6}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
								
								<div style="text-align:right;">
								审批部门（盖章）
								</div>
								<div style="text-align:right;">
          						<input name="gzsj6"  style="width:100px" value="${gzsj6}" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="50%">
				
					<table width="100%" border=0 class="tableCss" cellspacing="1" cellpadding="0">
					</table>
					
				</td>
			</tr>
		</table>
		<table width="1100" align="center" style="margin-top:30px;">
			<tr>
				<td align="right" width="50%">
				 <input type="button" id="savezs" onclick="savefb2();" value="保&nbsp;&nbsp;存" style="width:100px;display:none"/> 
				 <input type="button"  id="printzs" onclick="printQyzzfb();" value="打&nbsp;&nbsp;印" style="width:100px;"/>
				</td>
				<td  width="40%" style="">
				<input type="button" value="关闭窗口" onclick="window.close();" style="width:100px;"/>
				</td>
			</tr>
		</table>
		</form>
		<div id="autoPrintDiv" style="display:none;"><iframe height='1000' width='700' name='autoPrintIFrame'/></div>
	</body>
</html>